/* static/css/products.css */

/* General styling */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background-color: #f5f5f5; /* 备用背景颜色 */
    background-image: url('../image/backgrand.png');
    background-size: cover;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

.container {
    flex: 1;
    z-index: 1;
    position: relative;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 10px;
    margin: 20px;
    padding: 20px;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #333;
    color: #fff;
    padding: 10px 20px;
    border-radius: 10px;
}

header h1 {
    margin: 0;
}

header nav a {
    color: #fff;
    text-decoration: none;
    font-weight: bold;
}

header nav a:hover {
    text-decoration: underline;
}

.content {
    display: flex;
    margin-top: 20px;
}

.categories {
    width: 25%;
    background: rgba(51, 51, 51, 0.8);
    color: #fff;
    padding: 20px;
    border-radius: 10px;
}

.categories h2 {
    margin-top: 0;
}

.categories ul {
    list-style-type: none;
    padding: 0;
}

.categories ul li {
    margin-bottom: 10px;
}

.categories ul li a {
    color: #fff;
    text-decoration: none;
}

.categories ul li a:hover {
    text-decoration: underline;
}

.product-list {
    width: 75%;
    padding: 20px;
}

.product-list h2 {
    margin-top: 0;
}

.product-list ul {
    list-style-type: none;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.product-list ul li {
    background: rgba(255, 255, 255, 0.9);
    margin-bottom: 20px;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s, box-shadow 0.2s;
    flex: 1 1 calc(33.333% - 20px); /* 三列布局 */
    box-sizing: border-box;
}
.product-list img, .recommended img {
    width: 200px;  /* 设置图片宽度 */
    height: 200px; /* 设置图片高度 */
    object-fit: cover; /* 保持图片的纵横比 */
}

.product-list ul li:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.product-list ul li h3 {
    margin-top: 0;
}

.recommended {
    margin-top: 20px;
}

.recommended h2 {
    margin-top: 0;
}

.recommended ul {
    list-style-type: none;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.recommended ul li {
    background: rgba(255, 255, 255, 0.9);
    margin: 10px;
    padding: 20px;
    border-radius: 10px;
    flex: 1 1 calc(33.333% - 20px); /* 三列布局 */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}

.recommended ul li:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.recommended ul li h3 {
    margin-top: 0;
}

footer {
    background-color: #333;
    color: #fff;
    text-align: center;
    padding: 10px 0;
    margin-top: auto;
    width: 100%;
}

footer p {
    margin: 0;
}

footer ul {
    list-style-type: none;
    padding: 0;
    margin: 10px 0 0 0;
    display: flex;
    justify-content: center;
}

footer ul li {
    margin: 0 15px;
}

footer ul li a {
    color: #fff;
    text-decoration: none;
}

footer ul li a:hover {
    text-decoration: underline;
}
.pagination {
    text-align: center;
    margin: 20px 0;
}

.pagination a,
.pagination span {
    color: #333;
    text-decoration: none;
    margin: 0 5px;
    padding: 5px 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    background-color: #fff;
    transition: background-color 0.3s;
}

.pagination a:hover {
    background-color: #ffb3b3;
}
.product-list ul li:hover,
.recommended ul li:hover {
    box-shadow: 0 12px 24px rgb(255, 127, 127); /* 更强的悬停阴影效果 */
}

.product-list ul li,
.recommended ul li {
    box-shadow: 0 6px 12px rgb(217, 248, 217); /* 增强阴影效果 */
}